<?php
/**
 * Article Controller.
 *  
 * @author Nguyen Hai Ha
 * @version 1.0
 */

class Member_ArticleController extends Zend_Controller_Action
{  
	
	protected $_acl; 
    protected $_application;
 
    public function init() 
    { 
        /** Get our Action Helper */
        $this->_acl = $this->_helper->getHelper('acl');

//        require_once 'Zend/Session/Namespace.php';
        $this->_application = new Zend_Session_Namespace('myApplication');
    }
 
    public function editAction() 
    { 
        /** Load article by id */ 
        $article = new Article($this->_request->id);

        /** Validate if the user is the owner or an Admin */
        if (($article->author != $this->_application->loggedUser) && ($this->_application->currentRole != 'admin')) { 
            $this->_acl->denyAccess(); 
        }
    } 

	public function indexAction(){}
	
	public function addAction(){}
		
}//End class.